using UnityEngine;
using UnityEngine.UI;
using QFramework;

namespace QFramework.Example
{
	public class UILoginPanelData : UIPanelData
	{
	}
	public partial class UILoginPanel : UIPanel
	{
		protected override void OnInit(IUIData uiData = null)
		{
			mData = uiData as UILoginPanelData ?? new UILoginPanelData();
			// please add init code here
			LoginBtn.onClick.AddListener(() =>
			{
                UIKit.OpenPanel<UIGamePanel>();
				UIKit.ClosePanel<UILoginPanel>();
            });
			RegisterBtn.onClick.AddListener(() =>
			{
				UIKit.OpenPanel<UIRegisterPanel>();
				UIKit.ClosePanel<UILoginPanel>();
			});
		}
		
		protected override void OnOpen(IUIData uiData = null)
		{
		}
		
		protected override void OnShow()
		{
		}
		
		protected override void OnHide()
		{
		}
		
		protected override void OnClose()
		{
		}
	}
}
